<!--{*
/*
 * This file is part of EC-CUBE
 *
 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
 *
 * http://www.lockon.co.jp/
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
*}-->
<script language="JavaScript">
<!--
var flag = 0;

function setFlag(){
	flag = 1;
}
function checkFlagAndSubmit(){
	if ( flag == 1 ){
		if( confirm('内容が変更されています。続行すれば変更内容は破棄されます。\n宜しいでしょうか？' )){
			fnSetvalAndSubmit( 'form1', 'mode', 'id_set' );
		} else {
			return false;
		}
	} else {
		fnSetvalAndSubmit( 'form1', 'mode', 'id_set' );
	}
}

//-->
</script>

<div id="alpha">
<div id="alpha-inner">
<!--▼SUB NAVI-->
<!--{include file=$tpl_subnavi}-->
<!--▲SUB NAVI-->
</div>
</div>



<div id="beta">
<div id="beta-inner">
<form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->">
<input type="hidden" name="mode" value="regist">
<div class="title_page">
<h2><!--{$tpl_subtitle}--></h2>
</div>



<div class="menuclass">
<dl>
<dt>テンプレート<span class="red"> *</span></dt>
<dd>
	<!--{assign var=key value="template_id"}-->
	<span class="red12"><!--{$arrErr[$key]}--></span>
	<select name="template_id" onChange="return checkFlagAndSubmit();" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
	<option value="" selected="selected">選択してください</option>
	<!--{html_options options=$arrMailTEMPLATE selected=$arrForm[$key]}-->
	</select>
</dd>

<dt>メールタイトル<span class="red"> *</span></dt>
<dd>
	<!--{assign var=key value="subject"}-->
	<span class="red12"><!--{$arrErr[$key]}--></span>
	<input type="text" name="subject" value="<!--{$arrForm[$key]|escape}-->" onChange="setFlag();" size="30" class="box30" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
</dd>
</dl>
</div>



<div class="menuclass">
<table summary="メール設定">
<tr>
	<th>ヘッダー</th>
	<td>
	<!--{assign var=key value="header"}-->
	<span class="red12"><!--{$arrErr[$key]}--></span>
	<textarea name="header" cols="75" rows="12" class="area75" onChange="setFlag();" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"><!--{$arrForm[$key]|escape}--></textarea><br />
	<span class="red"> （上限<!--{$smarty.const.LTEXT_LEN}-->文字）</span>

	<div align="right">
	<input type="button" width="110" height="30" value="文字数カウント" onclick="fnCharCount('form1','header','cnt_header');" border="0" name="next" id="next" />
	今までに入力したのは<input type="text" name="cnt_header" size="4" class="box4" readonly = true style="text-align:right">文字です。
	</div>
	</td>
</tr>

	<tr>
	<td align="center" height="40" colspan="2">動的データ挿入部分</td>
	</tr>

<tr>
<th>フッター</th>
<td>
	<!--{assign var=key value="footer"}-->
	<span class="red12"><!--{$arrErr[$key]}--></span>
	<textarea name="footer" cols="75" rows="12" class="area75" onChange="setFlag();" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"><!--{$arrForm[$key]|escape}--></textarea><br />
	<span class="red"> （上限<!--{$smarty.const.LTEXT_LEN}-->文字）</span>
	<div align="right">
	<input type="button" width="110" height="30" value="文字数カウント" onclick="fnCharCount('form1','footer','cnt_footer');" border="0" name="next" id="next" />
	今までに入力したのは<input type="text" name="cnt_footer" size="4" class="box4" readonly = true style="text-align:right">文字です。
	</div>
</td>
</tr>
</table>
</div>



<div class="btn_box">
<input type="submit" value="この内容で登録する" name="subm" />
</div>

</form>
</div>
</div>
